<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<style>
    .fade-enter-active,
    .fade-leave-active {
        transition: opacity .5s;
    }
    .fade-enter,
    .fade-leave-to  {
        opacity: 0;
    }
</style>
<body>
<div id="demo">
    <button v-on:click="show = !show">
        Toggle
    </button>
    <transition
            name="fade"
            :duration="10000"
    >
        <p v-if="show">hello</p>
    </transition>
</div>

    <script>
        new Vue({
            el: '#demo',
            data: {
                show: true
            }
        })
    </script>
</div>
</body>
</html>